`.' cannot appear in a constant-expression

Posted by Amir Rachum on Stack Overflow See other posts from Stack Overflow or by Amir Rachum
Published on 2010-05-09T07:37:55Z Indexed on 2010/05/09 7:48 UTC
Read the original article Hit count: 208

Filed under:
|
|

Hi all,

I'm getting the following error:

`.' cannot appear in a constant-expression

for this function (line 4):

    bool Covers(const Region<C,V,D>& other) const {
        const Region& me = *this;
        for (unsigned d = 0; d < D; d++) {
            if (me[d].min > other[d].min || me[d].max < other[d].max) {
                return false;
            }
        }

can anyone explain the problem please?

© Stack Overflow or respective owner

Related posts about c++

Related posts about templates